Skip to content

update bandit actions config to a more current version#352

Open
MoralCode wants to merge 1 commit into
mainfrom
ops/bandit_fix
Open

update bandit actions config to a more current version#352
MoralCode wants to merge 1 commit into
mainfrom
ops/bandit_fix

Conversation

@MoralCode
Copy link
Copy Markdown
Contributor

Description
Despite multiple previous attempts (i.e. #266 ), Bandit is still flagging scan results in unit test files.

This seems to be caused by the outdated nature of the upstream action. While the action had a way to exclude "paths", I suspect this wasnt getting passed in correctly (or was being interpreted as a file path, not a directory). This, combined with a lack of a config item that mapped to -c for specifiying a config file (i.e. our pyproject.toml), meant that bandit likely wasn't even seeing the preference we had set to ignore the tests directory.

This PR updates our bandit job to be based on the changes proposed in shundor/python-bandit-scan#6, which bring in this -c configuration value, as well as bump some other components to newer versions.

This PR fixes #239

Notes for Reviewers
As a CI job, testing will probably need to be done mainly after-merge to see if this has an impact. my plan is to (once again) clear out all the false positive results from unit test files in the github code scanning tab and then wait for the next tuesday (when this action is scheduled to rerun)

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Adrian Edwards <adredwar@redhat.com>
@MoralCode MoralCode added the devops Development Operations label May 28, 2026
@MoralCode MoralCode moved this to In Progress in CollectOSS Feature Roadmap May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops Development Operations

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

disable bandit warning about assert calls in unit tests

1 participant